#ifndef IMAGEPLAYERTHREAD_H
#define IMAGEPLAYERTHREAD_H

#include <QThread>
#include <QLabel>
#include <QStringList>

class ImagePlayerThread : public QThread
{
    Q_OBJECT

public:
    explicit ImagePlayerThread(QLabel* displayLabel, QObject* parent = nullptr);
    void startPlayback(const QStringList& imagePaths, int intervalMs = 1000);
    void stopPlayback();

signals:
    void imageChanged(const QString& imagePath);

protected:
    void run() override;

private:
    QLabel* displayLabel;
    QStringList imagePaths;
    int intervalMs;
    bool isRunning;
};

#endif // IMAGEPLAYERTHREAD_H
